import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import Desktop from '../views/Desktop.vue'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path:'/home',
    name:'Home',
    component:Home,
    redirect:'/desktop',
    children:[
      {
        path:'/desktop',
        name:'/desktop',
        component:Desktop
      },
      // {
      //   path: '/departmentList',
      //   name: 'departmentList',
      //   component:()=> import('../views/system/Department/DepartmentList.vue')
      // },
      // {
      //   path: '/userList',
      //   name: 'userList',
      //   component: ()=> import('../views/system/User/UserList.vue')
      // },
      // {
      //   path: '/roleList',
      //   name: 'roleList',
      //   component: ()=> import('../views/system/Role/RoleList.vue')
      // },
      // {
      //   path: '/menuList',
      //   name: 'menuList',
      //   component: ()=> import('../views/system/Menu/MenuList.vue')
      // },
      // {
      //   path: '/goodCategory',
      //   name: 'goodCategory',
      //   component: ()=> import('../views/goods/goodsCategory/goodsCategoryList.vue')
      // },
      // {
      //   path: '/goodsBrand',
      //   name: 'goodsBrand',
      //   component: ()=> import('../views/goods/goodsBrand/goodsBrandList.vue')
      // },
      // {
      //   path: '/systemCode',
      //   name: 'systemCode',
      //   component: ()=> import('../views/system/config/code.vue')
      // },
      // {
      //   path: '/document',
      //   name: 'document',
      //   component: ()=> import('../views/system/config/systemDocument.vue')
      // }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
